home *** CD-ROM | disk | FTP | other *** search
- object Demo1: TDemo1
- Left = 7
- Top = 86
- Width = 648
- Height = 488
- Caption = 'Filter Demo Form'
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Arial'
- Font.Style = []
- PixelsPerInch = 96
- Position = poScreenCenter
- WindowState = wsMaximized
- TextHeight = 14
- object TabbedNotebook1: TTabbedNotebook
- Left = 0
- Top = 0
- Width = 640
- Height = 296
- Align = alClient
- TabFont.Color = clBtnText
- TabFont.Height = -11
- TabFont.Name = 'MS Sans Serif'
- TabFont.Style = []
- TabOrder = 0
- object TTabPage
- Left = 5
- Top = 26
- Caption = 'TFilter'
- object Label10: TLabel
- Left = 21
- Top = 128
- Width = 333
- Height = 14
- Caption =
- 'Note that all these filters are independent of the current CustN' +
- 'o Index'
- Color = clRed
- ParentColor = False
- end
- object Label3: TLabel
- Left = 8
- Top = 248
- Width = 471
- Height = 15
- AutoSize = False
- Caption =
- 'If you do not deactivate the filter before going to the next pag' +
- 'e you will '#39'and'#39' ing the filters!!'
- Color = clRed
- ParentColor = False
- WordWrap = True
- end
- object ClearBtn: TButton
- Left = 392
- Top = 211
- Width = 88
- Height = 33
- Caption = 'Clear Filter'
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- TabOrder = 1
- OnClick = ClearBtnClick
- end
- object ActivateBtn: TButton
- Left = 7
- Top = 211
- Width = 88
- Height = 33
- Caption = 'Activate'
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- TabOrder = 2
- OnClick = ActivateBtnClick
- end
- object DeActivateBtn: TButton
- Left = 103
- Top = 211
- Width = 88
- Height = 33
- Caption = 'DeActivate'
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- TabOrder = 3
- OnClick = DeActivateBtnClick
- end
- object RemoveBtn: TButton
- Left = 199
- Top = 211
- Width = 88
- Height = 33
- Caption = 'Remove Filter'
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- TabOrder = 4
- OnClick = RemoveBtnClick
- end
- object Memo4: TMemo
- Left = 8
- Top = 4
- Width = 613
- Height = 202
- Lines.Strings = (
-
- 'The TFilter component allows you to access the BDE Filter Langua' +
- 'ge from Delphi 1.0. Filters can be built at design time '
-
- 'using the FilterDesigner, or in procedures that can be called at' +
- ' run time. Additionally Filters can be saved or loaded '
-
- 'from a file. A RunTIme filter designer is provided for your end ' +
- 'users to design there own filters.'
- ''
-
- 'The design time FilterDesigner is accessed by double clicking on' +
- ' the component.'
- ''
-
- 'Filters stored in a file or written in a procedure must use the ' +
- 'BDE CANOP language (see help file), Filters designed in the '
- 'FilterDesigner use more familiar terms.'
- ''
-
- 'All Filters can be set to AutoActivate, that is to become active' +
- ' when the component is loaded and the GoFirst property '
-
- 'determines wether the dataset is moved to the first record whene' +
- 'ver the filter is activated or deactivated.'
- ''
-
- 'The example on this page illustrates a filter created with the d' +
- 'esign time FilterDesigner that displays only those '
-
- 'records with a non blank ADDR2 field and the COMPANY field doesn' +
- 't begin with K, this filter is AutoActivated.'
- ''
-
- 'You can Activate , DeActivate and Remove the filter. Note Removi' +
- 'ng a Filter only releases the BDE Filter resources. The '
-
- 'filter is still defined in Delphi and can quickly be reactivated' +
- ' or edited.'
-
- 'To totally remove a filter you must also Clear the filter defini' +
- 'tion from Delphi. '
- ''
-
- 'There is also a button to set another filter that is defined in ' +
- 'a procedure written at design time.'
- ''
-
- 'Note as this filter shares the same filter component this filter' +
- ' cannot be set UNTIL you first Clear the original filter.'
- ''
- 'The new filter was defined as'
- ''
- 'AddFilterCondition( COMPANY, canEQ, U.., canOR);'
-
- 'AddFilterCondition( LASTINVOICEDATE, canGT, 11/8/94 1:05:03 AM, ' +
- 'canNOTDEFINED);')
- ScrollBars = ssVertical
- TabOrder = 5
- end
- object AddBtn: TButton
- Left = 487
- Top = 230
- Width = 137
- Height = 33
- Caption = 'Add Filter'
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- TabOrder = 0
- OnClick = AddBtnClick
- end
- end
- object TTabPage
- Left = 5
- Top = 26
- Caption = 'FilterFunction'
- object CBackOnBtn: TButton
- Left = 16
- Top = 225
- Width = 146
- Height = 33
- Caption = 'Filter CallBack Event ON'
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- TabOrder = 0
- OnClick = CBackOnBtnClick
- end
- object CBackOffBtn: TButton
- Left = 177
- Top = 225
- Width = 144
- Height = 33
- Caption = 'Filter CallBack Event OFF'
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- TabOrder = 1
- OnClick = CBackOffBtnClick
- end
- object Memo1: TMemo
- Left = 16
- Top = 32
- Width = 593
- Height = 81
- Lines.Strings = (
-
- 'The Filter Function component allows you to install a filter tha' +
- 't generates an event whenever a record needs to be '
-
- 'checked to see if it should be displayed. Your event handler can' +
- ' acccess any field in the dataset or any other object or '
-
- 'dataset. You must not do anything in your event handler that cou' +
- 'ld either change the dataset state or move the record '
-
- 'position. The event handler just returns true to let the record ' +
- 'be displayed and false to prevent it.')
- TabOrder = 2
- end
- object Memo5: TMemo
- Left = 16
- Top = 168
- Width = 305
- Height = 49
- Lines.Strings = (
- 'Callsback to a function that only returns true if the COMPANY '
- 'field contains the character C.')
- TabOrder = 3
- end
- end
- object TTabPage
- Left = 5
- Top = 26
- Caption = 'FilterDesigner'
- object StoredBtn: TButton
- Left = 8
- Top = 224
- Width = 137
- Height = 33
- Caption = 'Prepare Designer Filter'
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- TabOrder = 0
- OnClick = StoredBtnClick
- end
- object Button1: TButton
- Left = 152
- Top = 224
- Width = 137
- Height = 33
- Caption = 'Activate Designer Filter'
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- TabOrder = 1
- OnClick = Button1Click
- end
- object DesignerBtn: TButton
- Left = 8
- Top = 189
- Width = 137
- Height = 33
- Caption = 'Filter Designer'
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- TabOrder = 2
- OnClick = DesignerBtnClick
- end
- object Memo2: TMemo
- Left = 8
- Top = 16
- Width = 609
- Height = 57
- Lines.Strings = (
-
- 'The Filter Designer gives you a tool for your end users to desig' +
- 'n there own Filter at run time. The Designer has been '
-
- 'specifically designed to make the process as simple as possible ' +
- 'so we use a subset of the full Filter Language and we use '
-
- 'more familiar terms than the standard CANOP terms as well as usi' +
- 'ng field display labels rather than fieldnames.'
- '')
- TabOrder = 3
- end
- object Memo3: TMemo
- Left = 8
- Top = 80
- Width = 609
- Height = 106
- Lines.Strings = (
-
- 'In this particular case we have chosen to save the filter to dis' +
- 'k in the file FILTER.TXT. All TFilter components can '
-
- 'load or save filters to disk. Note that filters stored in a file' +
- ', like filters written in code must use the BDE CANOP Language, ' +
- 'this '
- 'is detailed in the help file'
- ''
-
- 'Filters can be prepared and then activated or simply activated i' +
- 'n one go, try it and see.'
-
- 'When you again access the FilterDesigner your existing filter is' +
- ' "read" by the Filter Designer so allowing you to continue '
- 'editing a filter if the result is not what you expected.'
- '')
- TabOrder = 4
- end
- object Button2: TButton
- Left = 296
- Top = 224
- Width = 137
- Height = 33
- Caption = 'Remove Filter'
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Arial'
- Font.Style = [fsBold]
- ParentFont = False
- TabOrder = 5
- OnClick = Button2Click
- end
- object Button3: TButton
- Left = 484
- Top = 224
- Width = 135
- Height = 33
- Caption = 'Load From File'
- TabOrder = 6
- OnClick = Button3Click
- end
- end
- end
- object Panel1: TPanel
- Left = 0
- Top = 296
- Width = 640
- Height = 165
- Align = alBottom
- Caption = 'Panel1'
- TabOrder = 1
- object DBNavigator1: TDBNavigator
- Left = 8
- Top = 5
- Width = 241
- Height = 25
- DataSource = DataSource1
- TabOrder = 0
- end
- object DBEdit1: TDBEdit
- Left = 256
- Top = 7
- Width = 49
- Height = 21
- DataField = 'CustNo'
- DataSource = DataSource1
- MaxLength = 0
- TabOrder = 1
- end
- object DBEdit2: TDBEdit
- Left = 312
- Top = 7
- Width = 153
- Height = 21
- DataField = 'Company'
- DataSource = DataSource1
- MaxLength = 30
- TabOrder = 2
- end
- object DBEdit3: TDBEdit
- Left = 472
- Top = 7
- Width = 153
- Height = 21
- DataField = 'Addr1'
- DataSource = DataSource1
- MaxLength = 30
- TabOrder = 3
- end
- object DBGrid1: TDBGrid
- Left = 8
- Top = 35
- Width = 625
- Height = 129
- DataSource = DataSource1
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Arial'
- Font.Style = []
- ParentFont = False
- TabOrder = 4
- TitleFont.Color = clWindowText
- TitleFont.Height = -13
- TitleFont.Name = 'System'
- TitleFont.Style = []
- end
- end
- object Table1: TTable
- Active = True
- DatabaseName = 'DBDEMOS'
- TableName = 'CUSTOMER.DB'
- end
- object DataSource1: TDataSource
- DataSet = Table1
- Top = 32
- end
- object FilterFunc1: TFilterFunc
- Dataset = Table1
- OnFilterRecord = FilterFunc1FilterRecord
- GoFirst = False
- AutoActivate = False
- Left = 32
- Top = 32
- end
- object Filter: TFilter
- Dataset = Table1
- GoFirst = False
- AutoActivate = True
- AutoPack = False
- Left = 64
- Conditions = (
- 'Addr2'
- 2
- 'ZZZZZZ'
- 10
- 1
- 0
- False
- 'ZZZZZZ'
- 0
- 'ZZZZZZ'
- 9
- 0
- 0
- False
- 'Company'
- 3
- 'K..'
- 0
- 1
- 3
- True)
- end
- object Filter1: TFilter
- Dataset = Table1
- GoFirst = False
- AutoActivate = False
- AutoPack = False
- Left = 32
- Conditions = ()
- end
- object Table2: TTable
- Active = True
- DatabaseName = 'DBDEMOS'
- TableName = 'EMPLOYEE.DB'
- Left = 5
- Top = 74
- end
- end
-